<!DOCTYPE html>
<html class="no-js">
<head>
  <base href="http://www.flywithme.top//">
  <script>
    document._writeOriginal = document.write;
    document.write = function(str) {
        if (str.indexOf('livereload.js') > -1) {
            document._writeOriginal(str);
        } else {
            document._writeOriginal('<!-- Be Hijack!! -->');
        }
    }
  </script>
  <title>JKImageView - Fly With Me</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="keywords" content="xxx,">
<meta name="description" content="项目地址:https://github.com/brasbug/JKImageView-- 第一步：拿到网络图片并显示出来 首先重网络拿到图片资">
<meta name="author" content="brasbug">
<meta name="publisher" content="brasbug">
<meta name="generator" content="http://gohugo.io/"/>

<meta itemprop="name" content="JKImageView - Fly With Me">
<meta itemprop="description" content="项目地址:https://github.com/brasbug/JKImageView-- 第一步：拿到网络图片并显示出来 首先重网络拿到图片资">
<meta itemprop="image" content="http://www.flywithme.top//public/coderjk.jpg">

<meta property="og:title" content="JKImageView - Fly With Me" />
<meta property="og:type" content="article" />
<meta property="og:url" content="http://www.flywithme.top/2015/02/27/JKImageView/" />
<meta property="og:image" content="http://www.flywithme.top//public/coderjk.jpg" />
<meta property="og:description" content="项目地址:https://github.com/brasbug/JKImageView-- 第一步：拿到网络图片并显示出来 首先重网络拿到图片资">

<meta name="twitter:card" content="summary">
<meta name="twitter:site" content="@brasbug">
<meta name="twitter:title" content="JKImageView - Fly With Me">
<meta name="twitter:description" content="项目地址:https://github.com/brasbug/JKImageView-- 第一步：拿到网络图片并显示出来 首先重网络拿到图片资">
<meta name="twitter:creator" content="@brasbug">
<meta name="twitter:image" content="http://www.flywithme.top//public/coderjk.jpg">

  <script>document.documentElement.className = document.documentElement.className.replace("no-js", "js");</script>
  <link rel="canonical" href="http://www.flywithme.top/2015/02/27/JKImageView/">
  <link rel='shortlink' href="http://www.flywithme.top/2015/02/27/JKImageView/"/>
  <link rel="shortcut icon" href="http://www.flywithme.top//public/coderjk.ico"/>
  
<link rel="stylesheet" id="human-style-css" href="http://www.flywithme.top/wp-content/themes/hueman/style.css" type="text/css" media="all"/>
<link rel="stylesheet" id="human-style-css2" href="http://www.flywithme.top/wp-content/themes/hueman-child/style.css" type="text/css" media="all"/>
<link rel="stylesheet" id="responsive-css" href="http://www.flywithme.top/wp-content/themes/hueman/responsive.css" type="text/css" media="all"/>
<link rel="stylesheet" id="font-awesome-css" href="http://www.flywithme.top/wp-content/themes/hueman/fonts/font-awesome.min.css" type="text/css" media="all"/>
<link rel="stylesheet" href="http://www.flywithme.top/public/highlight/styles/github.css">
<script src="http://www.flywithme.top/public/highlight/highlight.pack.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
<link rel="stylesheet" id="human-style-css3" href="http://www.flywithme.top/wp-content/themes/hueman-child/user.css" type="text/css" media="all"/>
<link rel="stylesheet" href="public/font/hack/css/hack.min.css">

<script type="text/javascript" src="assets/js/jquery-2.1.1.min.js"></script>
<script type="text/javascript" src="wp-content/themes/hueman/js/jquery.jplayer.min.js"></script>
<script type="text/javascript" src="wp-content/themes/hueman/js/scripts.js"></script>
<script type="text/javascript" src="assets/picturefill/picturefill.min.js"></script>
<script type="text/javascript" src="assets/js/jquery.matchHeight-min.js"></script>
<script type="text/javascript" async defer src="assets/js/myblog.js"></script>

</head>

<body class="single single-post single-format-standard col-3cm full-width topbar-enabled chrome">
<div id="wrapper">
  <header id="header">

  <nav class="nav-container group" id="nav-topbar">
    <div class="nav-toggle"><i class="fa fa-bars"></i></div>
    <div class="nav-text"></div>
    <div class="nav-wrap container">
      <a rel="nofollow" href="http://www.flywithme.top//" class="nav-cs-icon">
        <img width="40" height="40" src="http://www.flywithme.top/public/coderjk.jpg" alt="brasbug" title="Home">
      </a>
      <ul id="menu-default-menu" class="nav container-inner group">
        <li class="menu-item menu-item-type-post_type menu-item-object-page">
          <a rel="nofollow" href="http://www.flywithme.top/">首页</a>
        </li>
        
        <li class="menu-item menu-item-type-post_type menu-item-object-page">
          <a rel="nofollow" href="http://www.flywithme.top/categories/%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0/">学习笔记</a>
        </li>
        
        <li class="menu-item menu-item-type-post_type menu-item-object-page">
          <a rel="nofollow" href="http://www.flywithme.top/categories/%E6%8A%80%E6%9C%AF%E6%96%87%E7%AB%A0/">技术文章</a>
        </li>
        
        <li class="menu-item menu-item-type-post_type menu-item-object-page">
          <a rel="nofollow" href="http://www.flywithme.top/categories/%E6%80%9D%E8%80%83%E6%84%9F%E6%82%9F/">思考感悟</a>
        </li>
        
        <li class="menu-item menu-item-type-post_type menu-item-object-page">
          <a rel="nofollow" href="http://www.flywithme.top/categories/%E8%AF%BB%E4%B9%A6%E7%AC%94%E8%AE%B0/">读书笔记</a>
        </li>
        
        
        <li class="menu-item menu-item-type-post_type menu-item-object-page">
          <a rel="nofollow" href="http://www.flywithme.top/post/">归档</a>
        </li>
        
        <li class="menu-item menu-item-type-post_type menu-item-object-page">
          <a rel="nofollow" href="http://www.flywithme.top/about/">关于我</a>
        </li>
        
        
          
        
        <li class="menu-item menu-item-type-post_type menu-item-text">
        浪尖一滴水,引领一片潮
        </li>
      </ul>
    </div>

    <div class="container">
      <div class="container-inner">
        <div class="toggle-search"><i class="fa fa-search"></i></div>
        <div class="search-expand">
          <div class="search-expand-inner">
            <form method="get" class="searchform themeform" action="https://www.google.com/search">
              <div>
                <input type="text" class="search" name="q" placeholder="Press enter to start searching">
              </div>
            </form>
          </div>
        </div>
      </div>
      
    </div>
    

  </nav>
  

  <div class="container group">
    <div class="container-inner">

      <div class="group pad">

        <div class="group pad">
          <h1 class="site-title">
            <a rel="nofollow" href="http://www.flywithme.top//" rel="home">
              <img style="border-radius: 50%;width:72px;height:72px;margin:0 auto;" alt="brasbug" src="http://www.flywithme.top/public/coderjk.jpg"></img>
              Fly With Me
            </a>
          </h1>
          <p class="site-description"> 漫步走在沙滩上 </p>
        </div>

      </div>
    </div>
    
  </div>
  

</header>



  <div class="container" id="page">
    <div class="container-inner">
      <div class="main">
        <div class="main-inner group">
          <section class="content">
            <div class="page-title pad group">
              <ul class="meta-single group">
                
                <li class="category">
                  <a href="http://www.flywithme.top/categories/%E6%8A%80%E6%9C%AF%E6%96%87%E7%AB%A0/" rel="category tag">技术文章</a>
                </li>
                
              </ul>
            </div>

            <div class="pad group">

              <article
                  class="post type-post status-publish format-standard has-post-thumbnail hentry category-australien tag-bondi-beach tag-city2surf tag-sydney">
                <div class="post-inner group">

                  <h1 class="post-title">JKImageView</h1>

                  <p class="post-byline">
                    by  · 2015年02月27日 · 1644 Words ·
                    ~4min reading time |
                    <a href="https://github.com/brasbug/brasbug-hugo-blog/tree/master/content/post/2015/2015-02-27-JKImageView.md"
                       target="_blank">Improve on <i class="fa fa-github"></i></a>
                  </p>

                  <div class="clear"></div>

                  <div class="entry">
                    <div class="entry-inner">
                      
                      <div id="article_content" class="article_content">

<!--<div style="font-size:21px; color:rgb(30,78,121)"><span style="font-family:Helvetica Neue"><a target="_blank" target="_blank" href="https://github.com/brasbug/JKImageView">项目地址:https://github.com/brasbug/JKImageView</a></span></div>-->
<div style="font-size:21px; color:rgb(30,78,121)"><span style="font-family:Helvetica Neue"><br>
</span></div>
<div style="font-size:21px; color:rgb(30,78,121)"><span style="font-family:'Helvetica Neue'">第一步：拿到网络图片并显示出来</span></div>
<ol style="font-size:14px">
<li value="1" style="vertical-align:middle"><span style="font-size:16px"><span style="font-family:Helvetica">首先重网络拿到图片资源</span></span>
<ul>
<li value="1" style="vertical-align:middle">代码<img src="http://img.blog.csdn.net/20151111193517077?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt=""></li></ul>
</li></ol>
<div style="font-size:11px"><span style="font-family:'Helvetica Neue'"><br>
</span></div>
<ol style="font-size:14px">
<li value="2" style="vertical-align:middle"><span style="font-size:16px"><span style="font-family:Helvetica"><span lang="zh-CN">把拿到的图片资源给相应的控件来展示</span><span lang="en-US">&nbsp;</span><span lang="zh-CN">so</span><span lang="en-US">easy !!</span></span></span>
<ul>
<li value="2" style="vertical-align:middle">代码<img src="http://img.blog.csdn.net/20151111193549847?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt=""></li><li value="2" style="vertical-align:middle"><span style="font-family:'Helvetica Neue'"><span style="color:rgb(94,94,94)"><span style="font-size:13px">然而因为没有考虑线程阻塞问题，一张图片还好，如果有多张网络图片或者列表里需要展示一系列网络图片，这样做的结果就是被自己蠢哭！</span></span></span></li></ul>
</li></ol>
<div style="font-size:11px"><span style="font-family:'Helvetica Neue'"><span style="color:rgb(151,151,151)">&nbsp;</span></span></div>
<div style="font-size:14px"><span style="font-family:'Helvetica Neue'"><span style="color:rgb(117,112,112)"><br>
</span></span></div>
<div style="font-size:21px; color:rgb(30,78,121)"><span style="font-family:'Helvetica Neue'">第二步：怎么做才能让我拿到图片的时候不卡</span></div>
<ul style="font-size:14px">
<li><span style="font-family:Helvetica"><span style="font-size:16px">这个时候就需要借助于多线程技术了</span></span>
<ul>
<li><span style="font-size:13px"><span style="font-family:'Helvetica Neue'">多线程是什么玩意儿：<span style="color:rgb(94,94,94)">iOS程序在启动的时候会创建一个主线程。因为一个线程只能执行一件事情，如果主线程执行某些耗时操作，比如我之前遇到的问题加载图片，或者是下载资源文件等就会阻塞主线程(导致界面卡死现象)，所以就需要使用多线程技术避免这类情况。iOS中有三种多线程技术，NSThread，NSOperation，GCD，这3种技术随着iOS的发展引入，抽象层次由低到高，使用也越来越简单。</span></span></span></li></ul>
</li><li><span style="font-size:16px"><span style="font-family:Helvetica">多线程一些必要知识点</span></span>
<ol>
<li><span style="color:rgb(94,94,94)"><strong>多线程使用并不是无节制的</strong>：iOS主线程堆栈大小是1M左右<a target="_blank" href="http://blog.csdn.net/brasbug/article/details/50232829">点击打开链接</a>，从第二个线程开始都是512KB（<a target="_blank" target="_blank" href="https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/Multithreading/CreatingThreads/CreatingThreads.html"><span style="color:rgb(94,94,94)">官方文档</span></a>）</span></li><li><span style="color:rgb(94,94,94)"><strong>只有主线程可以修改UI</strong>（显示图片，更改显示文字等）,因为其余线程都是独立于Cocao Touch的，虽然有时在异步线程中可以实现界面修改，但是强烈不建议这么做。</span></li><li><span style="color:rgb(94,94,94)"><strong>多线程并不能提高程序的运行效率</strong>，而是通过并发任务提高资源使用率来提高系统的整体性能。就单核而言，两个线程可以解决线程阻塞问题，但是执行效率比起一个线程执行是差不多的，并且再创建一个新线程的时候会消耗一定的内存和CPU时间。多线程只是葱粉发挥系统多核处理器的优势，并发执行任务以提高效率。但是哪个CPU上执行任务都是由系统调度的，开发者不需要纠结有几个CPU，只需要关系线程的使用以及线程间的关系就可以了。</span></li><li><span style="color:rgb(94,94,94)">尽量不要多个线程去抢夺共享资源，如果必须要这样做，需要注意线程安全。</span></li></ol>
</li></ul>
<div style="font-size:14px"><span style="color:rgb(94,94,94)"><br>
</span></div>
<ul style="font-size:14px">
<li><span style="font-size:16px"><span style="font-family:Helvetica"><span lang="zh-CN">So 现在开始考虑到底选用哪一种方法来完成我的功能</span><span lang="zh-CN">。</span></span></span>
<ol>
<li><span style="font-size:13px"><span style="font-family:'Helvetica Neue'"><span style="color:rgb(117,112,112)"><span style="color:rgb(0,144,81)"><span lang="zh-CN"><a target="_blank" target="_blank" href="http://www.flywithme.top/2015/02/25/NSThread/">NSThread</a></span></span></span></span></span></li><li><span style="font-size:13px"><span style="font-family:'Helvetica Neue'"><span lang="zh-CN"><a target="_blank" target="_blank" href="http://www.flywithme.top/2015/02/24/NSOperation/">NSOperation</a></span></span></span></li><li><span style="font-size:13px"><span style="font-family:'Helvetica Neue'"><span style="color:rgb(117,112,112)"><span style="color:rgb(0,144,81)"><span lang="zh-CN"><a target="_blank" href="http://www.flywithme.top/2015/01/20/GCD/">GCD（全称：Grand
 Central Dispatch）</a></span></span><span lang="zh-CN">（</span><span lang="en-US">&nbsp;</span><span lang="zh-CN">是基于</span><span lang="en-US">C</span><span lang="zh-CN">语言的框架，可以充分利用多核，是苹果推荐使用的多线程技术）</span></span></span></span></li></ol>
</li></ul>
<ul style="font-size:14px">
<li><span style="font-size:16px"><span style="font-family:Helvetica">选哪一种技术来完成我的图片异步加载</span></span>
<ol>
<li>NSThread 不能控制线程执行顺序，不能控制线程并发数，需要自己管理线程生命周期（我要做的太多）</li><li>GCD会自动管理线程的生命周期（创建线程、调度任务、销毁线程）（我能做的太少，如果是一个用时非常长的操作，我无法取消）</li><li>NSOperation 我不想做的和我想自己做的都给我预留。 看来只能选你啦。（可以很方便的取消一个线程，可以很容易的添加依赖关系，可以设置最大并发数，提供了任务状态。）</li></ol>
</li></ul>
<div style="font-size:14px"><br>
</div>
<div style="font-size:14px"><span style="font-family:'Helvetica Neue'"><span style="color:rgb(30,78,121)"><span style="font-size:21px">第三步：新建一个UIImageView的Category &nbsp;UIImageView&#43;JKWebCache</span></span></span><span style="font-family:'Helvetica Neue'; color:rgb(117,112,112); font-size:15px">&nbsp;</span></div>
<ul style="font-size:14px">
<li>写出异步方法并用来加载网络图片
<ul>
<li>加载代码<img src="http://img.blog.csdn.net/20151111193615033?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt=""></li><li>结果：图片加载成功，而且没有卡主线程。 但是列表每次重载图片的时候都会重新请求网络图片，效果没达到预期。</li></ul>
</li><li>看来需要把图片缓存下来，以便下次重载的时候调用。
<ul>
<li>JKImageCache &nbsp; 这个类是我用来处理缓存数据的。</li><li>有一个单例方法 &#43;(instancetype)shareInstance &nbsp; &nbsp; &nbsp;</li><li>我选择用<a target="_blank" target="_blank" href="">NSCache</a> 来存储下载的图片数据</li><li><br>
</li></ul>
</li><li>但是有一个问题关闭应用或者内存报警之后NSCache会清除一部分数据或者清空，再次加载同一张照片的时候还是会再下载一次。</li><li>SO：我打算把下载的图片缓存到disk中,下次加载的时候先从内存拿，拿不到再去disk拿，也拿不到就去下载。下载成功之后会缓存到内存和disk中。
<ul>
<li><img src="http://img.blog.csdn.net/20151111193710356?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt=""><br>
</li></ul>
</li><li></li></ul>
<ul style="font-size:14px">
<li>
<ul style="font-size:14px">
<li>但是当我再重本地拿图片的时候发现了一个Bug &nbsp;之前加载的GIF图片不会动了。
<ul>
<li>经查找原因 ，应该是存储是时候损失了一些图片信息 判断data是不是空， 非空就不再做图片转换。</li><li><img src="http://img.blog.csdn.net/20151120174037166?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt=""><br>
</li></ul>
</li><li></li><li>加上占位图功能 过期图片自动清理（每次当应用退出到后天的时候会调用cleanDiskFile方法清理过期图片）
<ul>
<li>判断缓存和内存中没有改地址图片的的时候使用占位图展示。</li><li><img src="http://img.blog.csdn.net/20151120174116617?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt=""></li><li><img src="http://img.blog.csdn.net/20151120174139005?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt=""><br>
</li></ul>
</li></ul>
</li><li><span style="white-space:pre"></span>
<ul style="font-size:14px">
<li>一个最基本的 网络图片加载工具完成了。</li></ul>
<div style="font-size:14px"></div>
</li></ul>
<div style="font-size:14px"><br>
</div>
<div style="font-size:15px; color:rgb(117,112,112)"><span style="font-family:'Helvetica Neue'">&nbsp; &nbsp; &nbsp;</span></div>
<div style="font-size:14px"><span style="font-family:'Helvetica Neue'"><span style="color:rgb(30,78,121)"><span style="font-size:21px">第四步：<span style="font-family:'Helvetica Neue'; font-size:21px"><span style="color:rgb(30,78,121)">优化一些细节</span></span></span></span></span></div>
<ul style="font-size:14px">
<li><span style="font-family:'Helvetica Neue'; font-size:14px">图片下载方法过于简单， 会遇到很多无法下载的情况，而无法查找原因</span></li><li><span style="font-family:'Helvetica Neue'; font-size:14px"><img src="http://img.blog.csdn.net/20151120174212964?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt=""><br>
</span></li><li><span style="font-family:'Helvetica Neue'; font-size:14px"><span style="font-size:14px">把下载抽出来做管理</span><br>
</span></li><li><span style="font-family:'Helvetica Neue'; font-size:14px"><span style="font-size:14px"><img src="http://img.blog.csdn.net/20151120174248939?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt=""><br>
</span></span></li><li><span style="font-family:'Helvetica Neue'; font-size:14px"><span style="font-size:14px"><span style="font-size:14px">增加了cancel 方法</span><br>
</span></span></li></ul>
<div style="font-size:14px"></div>
   

<p></div></p>

                      
                    </div>
                    <div style="border: 1px dashed #e0e0e0; padding: 10px 10px 10px 10px; background-color: #fffeee; background-repeat: no-repeat; background-attachment: scroll; background-position: 1% 50%; -moz-background-size: auto auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">
                        <div style="float:left;margin-top:0px;">
                        <img src="http://www.flywithme.top/public/qrcode.jpg" width="129px" height="129px"/>
                        <div style="text-align:center;">微信扫一扫</div>
                        </div>
                        <div>
                            <p style="margin-top:0px;">作者：<a target="_blank" href="http://blog.flywithme.top/">Brasbug</a>
                            <br />微信关注：Crime_Sence (我在案发现场）
                            <br />本文出处：<a target="_blank" href="http://www.flywithme.top/2015/02/27/JKImageView/">http://www.flywithme.top/2015/02/27/JKImageView/</a>
                            <br />
                            文章版权归本人所有，欢迎转载，但未经作者同意必须保留此段声明，且在文章页面明显位置给出原文连接，否则保留追究法律责任的权利。 </p>
                        </div>
                    </div>
                    <div class="clear"></div>
                  </div>
                  

                </div>
                
              </article>
              

              <div class="clear"></div>

              <p class="post-tags">
                <span>Tags:</span>
                
              </p>

              <h4 class="heading">
  <i class="fa fa-hand-o-right"></i>Related posts</h4>

    <ul class="related-posts group">
    
    
    
        
        
        
    
        
        
        
    
        
        
        
    
        
        
        
    
        
        
        
    
    </ul>



              <section id="comments" class="themeform">
<div class="ds-thread" data-thread-key="/2015/02/27/JKImageView/" data-title="JKImageView" data-url="http://www.flywithme.top/2015/02/27/JKImageView/"></div>
<script type="text/javascript">
var duoshuoQuery = {short_name:"brasbug"};
	(function() {
		var ds = document.createElement('script');
		ds.type = 'text/javascript';ds.async = true;
		ds.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//static.duoshuo.com/embed.js';
		ds.charset = 'UTF-8';
		(document.getElementsByTagName('head')[0] 
		 || document.getElementsByTagName('body')[0]).appendChild(ds);
	})();
</script>
</section>


              
            </div>


          </section>
          <div class="sidebar s1">
  <a class="sidebar-toggle" title="Expand Sidebar"><i class="fa icon-sidebar-toggle"></i></a>
  <div class="sidebar-content">
    <div class="sidebar-top group">
      <p>Follow:</p>
      <ul class="social-links">
    <li>
    <a class="social-tooltip" title="On WeiBo"
        href="http://weibo.com/u/2144561657?refer_flag=1005055013_&is_all=1" target="_blank">
        <i class="fa fa-weibo"></i>
    </a>
    </li>
    
    
        
        
    
    
    <li>
    <a class="social-tooltip" title="On GitHub"
        href="https://github.com/brasbug" target="_blank">
        <i class="fa fa-github"></i>
    </a>
    </li>
</ul>

    </div>
    <div class="widget qrcode">
    <img src="http://www.flywithme.top/public/qrcode.jpg" alt="qrcode" width="172px" height="172px"/>
    <p> 微信扫一扫：<br/> 关注我的公众号： <br /> Crime_Scene <br /> 交流QQ群：185198503 </p>
</div>

    <ul class="post-nav group">
      <li class="next">
        
        <a href="http://www.flywithme.top/2015/02/25/NSThread/" rel="next">
          <i class="fa fa-chevron-right"></i>
          <strong>Next post</strong>
          <span>NSThread</span>
        </a>
        
      </li>
      <li class="previous">
        
        <a href="http://www.flywithme.top/2015/08/17/appUpdate/" rel="prev">
          <i class="fa fa-chevron-left"></i>
          <strong>Previous Post</strong>
          <span>iOS App检测AppStore更新</span>
        </a>
        
      </li>
    </ul>
    <div id="search-2" class="widget widget_search"><h3>Search</h3>
      <form method="get" class="searchform themeform" action="https://www.google.com/search">
        <div>
          <input type="text" class="search" name="q" placeholder="Press enter to start searching">
        </div>
      </form>
    </div>
  </div>
  
</div>

          <div class="sidebar s2">
  <a class="sidebar-toggle" title="Expand Sidebar"><i class="fa icon-sidebar-toggle"></i></a>
  <div class="sidebar-content">
    <div class="sidebar-top group">
      <p>More</p>
    </div>
    <div id="categories-2" class="widget widget_categories"><h3>Categories</h3>
      <ul>
        
          <li class="cat-item cat-item-1">
            <a rel="nofollow" href="http://www.flywithme.top/categories/%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0/">学习笔记</a>
          </li>
        
          <li class="cat-item cat-item-1">
            <a rel="nofollow" href="http://www.flywithme.top/categories/%E6%8A%80%E6%9C%AF%E6%96%87%E7%AB%A0/">技术文章</a>
          </li>
        
          <li class="cat-item cat-item-1">
            <a rel="nofollow" href="http://www.flywithme.top/categories/%E6%80%9D%E8%80%83%E6%84%9F%E6%82%9F/">思考感悟</a>
          </li>
        
          <li class="cat-item cat-item-1">
            <a rel="nofollow" href="http://www.flywithme.top/categories/%E8%AF%BB%E4%B9%A6%E7%AC%94%E8%AE%B0/">读书笔记</a>
          </li>
        
      </ul>
    </div>
  </div>
</div>

        </div>
      </div>
    </div>
  </div>
  <footer id="footer">

  <nav class="nav-container group" id="nav-footer">
    <div class="nav-toggle"><i class="fa fa-bars"></i></div>
    <div class="nav-text"></div>
    <div class="nav-wrap">
      <ul id="menu-default-menu-1" class="nav container group">
        <li class="menu-item menu-item-type-post_type menu-item-object-page">
          <a rel="nofollow" href="http://www.flywithme.top/">首页</a>
        </li>
        
        <li class="menu-item menu-item-type-post_type menu-item-object-page">
          <a rel="nofollow" href="http://www.flywithme.top/categories/%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0/">学习笔记</a>
        </li>
        
        <li class="menu-item menu-item-type-post_type menu-item-object-page">
          <a rel="nofollow" href="http://www.flywithme.top/categories/%E6%8A%80%E6%9C%AF%E6%96%87%E7%AB%A0/">技术文章</a>
        </li>
        
        <li class="menu-item menu-item-type-post_type menu-item-object-page">
          <a rel="nofollow" href="http://www.flywithme.top/categories/%E6%80%9D%E8%80%83%E6%84%9F%E6%82%9F/">思考感悟</a>
        </li>
        
        <li class="menu-item menu-item-type-post_type menu-item-object-page">
          <a rel="nofollow" href="http://www.flywithme.top/categories/%E8%AF%BB%E4%B9%A6%E7%AC%94%E8%AE%B0/">读书笔记</a>
        </li>
        
      </ul>
    </div>
  </nav>
  

  <section class="container" id="footer-bottom">
    <div class="container-inner">
      <a id="back-to-top" href="#"><i class="fa fa-angle-up"></i></a>
      <div class="pad group">
        <div class="grid one-half">
          <div id="copyright">
            <p>Copyright © 2015. All Rights Reserved. <br>Powered by
              <a rel="nofollow" href="http://gohugo.io/" target="_blank">Hugo - the static site generator</a>.
              <a rel="nofollow" href="http://golang.org" target="_blank">#golang</a>.
            </p>
          </div>
          
        </div>
        
        <div class="grid one-half last">
          <ul class="social-links">
    <li>
    <a class="social-tooltip" title="On WeiBo"
        href="http://weibo.com/u/2144561657?refer_flag=1005055013_&is_all=1" target="_blank">
        <i class="fa fa-weibo"></i>
    </a>
    </li>
    
    
        
        
    
    
    <li>
    <a class="social-tooltip" title="On GitHub"
        href="https://github.com/brasbug" target="_blank">
        <i class="fa fa-github"></i>
    </a>
    </li>
</ul>

        </div>
      </div>

    </div>
    
  </section>
  

</footer>

</div>
<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-10147768-2', 'auto');
  ga('send', 'pageview');

  $('#messagesbsb').remove();

</script>
</body>
</html>

